package com.training.iyogo.dao.impl;

import java.util.List;

import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

import com.training.iyogo.dao.IScheduleDAO;
import com.training.iyogo.domain.Schedule;
@Repository
@Transactional
public class ScheduleDAOImpl extends BaseDAOImpl<Schedule> implements IScheduleDAO{

	@Override
	public Schedule findByTime(String time) {
		List<Schedule> list = find("from Schedule s" + " where s.time =?0", time);
		if (list.size() > 0)
			return list.get(0);
		return null;
	}
	
}
